    // 复选框全局状态值，初始值为未选中  0
    let Is_sp_check = 0

    function calculate() {
      let g = 9.8   //g 重力
      let input1 = parseFloat(document. getElementById("input1").value);   //m1
      let input2 = parseFloat(document. getElementById("input2").value);   //m2
      let input3 = parseFloat(document. getElementById("input3").value);  //φ1
      let input4 = parseFloat(document. getElementById("input4").value);  //φ2
      let input5 = parseFloat(document. getElementById("input5").value);  //k1
      let input6 = parseFloat(document. getElementById("input6").value);  //k2
      let input7 = parseFloat(document. getElementById("input7").value);  //s1
      let input8 = parseFloat(document. getElementById("input8").value);  //s2
      let input9 = parseFloat(document. getElementById("input9").value);  //x1
      let input10 = parseFloat(document.getElementById("input10").value); //x10
      let input11 = parseFloat(document.getElementById("input11").value); //x11
      let input12 = parseFloat(document.getElementById("input12").value); //y10
      let input13 = parseFloat(document.getElementById("input13").value); //y11


      if (!input1 ) input1  = 0;
      if (!input2 ) input2  = 0;
      if (!input3 ) input3  = 0;
      if (!input4 ) input4  = 0;
      if (!input5 ) input5  = 0;
      if (!input6 ) input6  = 0;
      if (!input7 ) input7  = 0;
      if (!input8 ) input8  = 0;
      if (!input9 ) input9  = 0;
      if (!input10) input10 = 0;
      if (!input11) input11 = 0;
      if (!input12) input12 = 0;
      if (!input13) input13 = 0;

      // 车辆1
      let result = 0
      let result1 = 0

      if (Is_sp_check == 1) {
// 1
        result = (105.3 * input9 + ((input1 * Math.sqrt(2*input3*g*input7*input5)+input2*Math.sqrt(2*input4*g*input8*input6)) / (input1+input2)) * 3.6).toFixed(2)
// 2
        result1 = (105.3*input9*input1/input2-((input1 * Math.sqrt(2*input3*g*input7*input5)+input2*Math.sqrt(2*input4*g*input8*input6)) / (input1+input2)) * 3.6).toFixed(2)

      } else {
//  1
        result = (105.3 * input9 + ((input1 * Math.sqrt(2*input3*g*input7*input5)-input2*Math.sqrt(2*input4*g*input8*input6)) / (input1+input2)) * 3.6).toFixed(2)
//  2
        result1 = (105.3*input9*input1/input2-((input1 * Math.sqrt(2*input3*g*input7*input5)-input2*Math.sqrt(2*input4*g*input8*input6)) / (input1+input2)) * 3.6).toFixed(2)

      }

      // 车辆2


      console.log("result=",result)
      if (result == 'NaN') {
        result = 0

        alert('请按要求输入数据！')
        location.reload()
      }
      // v1结果
      document.getElementById("result").textContent = result;
      // v2结果
      document.getElementById("result1").textContent = result1;
      
    }
    //	点击复选框时，获取复选框的状态
    function IsSP() {
      var Is_checkbox = document.getElementById("mycheck")
      if (Is_checkbox.checked) {
        Is_sp_check = 1   // 复选框被选中时，全局复选框状态值为1
      } else {
        Is_sp_check = 0	// 否则为0
      }
      //console.log('Is_checkbox=',Is_checkbox.checked)
    }